home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / public / TeX / Makefile.TeX3.14 < prev    next >
Makefile  |  1994-08-01  |  9KB  |  303 lines

  1.  
  2. # Overall Makefile for making TeX, Metafont, and friends, using WEB to C.
  3.  
  4. #--------------------------------------------------------
  5. #   Changed INSTALL directory from /usr/distribution
  6. #   to /usr/TeX_distribution (Marvin Kong, SGI, 12/4/91).
  7. #--------------------------------------------------------
  8.  
  9. # TeX 3.14 + Metafont 2.7 + web2c b.
  10. version=5.84b
  11.  
  12. # Directory that site.h is in relative to subdirectories, i.e., `..'
  13. # means the directory containing this Makefile.
  14. SITEDIR=..
  15.  
  16. # Default C compiler.
  17. #CC=gcc
  18. CC=cc
  19.  
  20. # Default flags to give the C compiler.  (Don't define CFLAGS directly.)
  21. #OPT=-g -O
  22. OPT=-g -O
  23.  
  24. # Default flags to give to the loader.
  25. LDFLAGS=
  26.  
  27. # Default libraries with which to link (libraries for the Metafont
  28. # support are specified separately).
  29. LOADLIBES=
  30.  
  31. # Make sure we use the sh.  If your sh is broken, you might try bash,
  32. # the GNU replacement.
  33. SHELL=/bin/sh
  34.  
  35. # The yacc program to use on web2c/web2c.yacc.
  36. #YACC=bison -y
  37. YACC=yacc
  38.  
  39. # The lex program to use on web2c/web2c.lex.
  40. LEX=lex
  41. # -ll for lex, -lfl for flex.
  42. LEXLIB=-ll
  43.  
  44. # Need -D_POSIX_SOURCE here, perhaps, if on a POSIX system.
  45. LEXCFLAGS=
  46.  
  47. # How to make a link.
  48. LN=ln -s
  49.  
  50. # Support libraries for Metafont.
  51. x10lib=-lX
  52. x11lib=-lXt -lX11
  53. sunlib=-lsuntool -lsunwindow -lpixrect
  54.  
  55. # This line should select the libraries that match what you said in site.h.
  56. wlibs=$(x11lib)
  57.  
  58. # These lines define the format and base files that `make fmts' and
  59. # `make bases' will try to make, and `make install' will try to install.
  60. # See README.W2C for a brief description of each of these formats.
  61. #formats=tex.fmt
  62. formats=tex.fmt latex.fmt slitex.fmt 
  63. #amstex.fmt amslatex.fmt picplus.fmt texinfo.fmt
  64. # etex.fmt latex.fmt slitex.fmt \
  65. # amstex.fmt amslatex.fmt picplus.fmt texinfo.fmt
  66. #bases=mf.base
  67. bases=mf.base cmmf.base
  68. # cmmf.base
  69.  
  70. # The name of the file that defines your local devices, for use with
  71. # Metafont.  (Only relevant during `make bases'.)  I urge you to get the
  72. # file `modes.mf', which defines all known modes, plus useful
  73. # definitions for all fonts.  It's available from ftp.cs.umb.edu
  74. # [192.12.26.23] as pub/tex/modes.mf, among other places.
  75. localmodes=modes
  76.  
  77.  
  78. # You may need INSTALL=cp on system V, if you don't have GNU install. 
  79. # Or you can install the programs by hand.
  80. # $(fileinstall) is used for the format and base files, man files, and
  81. # other non-executables, and $(programinstall) is used for
  82. # the executables.
  83. #INSTALL=install -g tex -c
  84. #fileinstall=$(INSTALL) -m 664
  85. #proginstall=$(INSTALL) -m 775 -s
  86. INSTALL=/usr/TeX_distribution/TeX3.14/emplant
  87. fileinstall=$(INSTALL) 664 bin sys
  88. proginstall=$(INSTALL) 755 bin sys
  89.  
  90. # These pathnames are used to customize the manual pages with local
  91. # directory names; some of them are used in `make install'.  They should
  92. # match the system directories in the paths defined in `./site.h'.
  93. bindir=/usr/local/bin
  94. manext=l
  95. mandir=/usr/man/u_man/man$(manext)
  96.  
  97. texlibdir=/usr/local/lib/tex
  98. texpooldir=$(texlibdir)
  99. #texinputdir=$(texlibdir)/macros
  100. texinputdir=$(texlibdir)/inputs
  101. #texfontdir=$(texlibdir)/fonts
  102. texfontdir=$(texlibdir)/fonts/tfm
  103. formatdir=$(texlibdir)/formats
  104.  
  105. mflibdir=/usr/local/lib/mf
  106. mfpooldir=$(mflibdir)
  107. #mfinputdir=$(mflibdir)/macros
  108. mfinputdir=$(mflibdir)/inputs
  109. basedir=$(mflibdir)/bases
  110.  
  111. # Where the Computer Modern sources are.
  112. # (The man pages claim that you have installed the standard utility
  113. # sources, like `grayf.mf' and `expr.mf', somewhere in $(mfinputdir).)
  114. #cmsources=/usr/local/src/other/TeX+MF/typefaces/cm
  115. cmsources=/usr/local/lib/mf/inputs
  116.  
  117. default: all
  118.  
  119.  
  120. # Stuff below here probably doesn't need to be changed.
  121. #alldirs=web tex mf texware mfware fontutil bibtex dviutil
  122. alldirs=web tex mf texware mfware fontutil dviutil
  123. triptrapdirs=tex texware mf mfware
  124.  
  125. makeargs=SITEDIR="$(SITEDIR)" CC="$(CC)" OPT="$(OPT)" \
  126. SHELL="$(SHELL)" LDFLAGS="$(LDFLAGS)" LOADLIBES="$(LOADLIBES)" wlibs="$(wlibs)"
  127.  
  128. web2c=web2c
  129. web2cprograms=$(web2c)/web2c $(web2c)/regfix $(web2c)/splitup \
  130.               $(web2c)/fixwrites
  131. commonsources=common/alloca.c common/extra.c common/main.c common/endian.c
  132.  
  133. triptrap: stamp-tangle stamp-common
  134.     for name in $(triptrapdirs);                    \
  135.         do                                \
  136.           (cd $${name}; make $(makeargs) LN="$(LN)" triptrap);        \
  137.         done  
  138.  
  139. run-triptrap: run-trip run-trap
  140.  
  141. clean-triptrap:
  142.     cd tex; make veryclean
  143.     cd mf; make veryclean
  144.  
  145. all:    stamp-web2c stamp-common
  146.     for name in $(alldirs);                        \
  147.         do                                \
  148.           (cd $${name}; echo $${name}; make $(makeargs) all);        \
  149.         done
  150.  
  151. TeX:    stamp-web2c stamp-tangle stamp-common
  152.     cd tex; make $(makeargs) all
  153.  
  154. BibTeX: stamp-web2c stamp-tangle stamp-common
  155.     cd bibtex; make $(makeargs) all
  156.  
  157. run-trip:
  158.     cd tex; make run-trip
  159.  
  160. MF:    stamp-web2c stamp-tangle stamp-common
  161.     cd mf; make $(makeargs) all
  162.  
  163. run-trap:
  164.     cd mf; make run-trap
  165.  
  166.  
  167. # The targets below must be up to date for anything to be made.
  168.  
  169. stamp-web2c:
  170.     cd $(web2c); \
  171.           make $(makeargs) YACC="$(YACC)" LEX="$(LEX)" LEXLIB="$(LEXLIB)" all
  172.     touch stamp-web2c
  173.  
  174. stamp-common: $(commonsources)
  175.     cd common; make $(makeargs) all
  176.     touch stamp-common
  177.  
  178. stamp-tangle: stamp-web2c stamp-common
  179.     cd web; make $(makeargs) tangle
  180.     touch stamp-tangle
  181.  
  182.  
  183. manpages:
  184.     cd man; make SITEDIR=$(SITEDIR)                    \
  185.         bindir=$(bindir) texlibdir=$(texlibdir)            \
  186.         texpooldir=$(texpooldir) formatdir=$(formatdir)        \
  187.         texinputdir=$(texinputdir) texfontdir=$(texfontdir)    \
  188.         mflibdir=$(mflibdir) mfpooldir=$(mfpooldir)        \
  189.         basedir=$(basedir) mfinputdir=$(mfinputdir)        \
  190.                 cmsources=$(cmsources)                    \
  191.                 all
  192.  
  193. bases: stamp-bases
  194. stamp-bases:
  195.     cd mf; MFPOOL=.; export MFPOOL; \
  196.           make bases="$(bases)" localmodes="$(localmodes)" bases
  197.     touch stamp-bases
  198.  
  199. formats: stamp-formats
  200. stamp-formats:
  201.     cd tex; TEXPOOL=.; export TEXPOOL; make formats="$(formats)" fmts
  202.     touch stamp-formats
  203.  
  204.  
  205. # Installation targets.
  206. install-manpages:
  207.     cd man; make mandir=$(mandir) INSTALL="$(fileinstall)" \
  208.           SITEDIR="$(SITEDIR)" manext=$(manext) install
  209.  
  210. install:
  211.     if test -d $(bindir); then exit 0; else mkdir $(bindir); fi
  212.     $(proginstall) tex/initex $(bindir)/initex
  213.     $(proginstall) tex/virtex $(bindir)/virtex
  214.     $(proginstall) mf/inimf $(bindir)/inimf
  215.     $(proginstall) mf/virmf $(bindir)/virmf
  216.     $(proginstall) web/tangle $(bindir)/tangle
  217.     $(proginstall) web/weave $(bindir)/weave
  218.     $(proginstall) texware/dvitype $(bindir)/dvitype
  219.     $(proginstall) texware/pltotf $(bindir)/pltotf
  220.     $(proginstall) texware/tftopl $(bindir)/tftopl
  221.     $(proginstall) mfware/gftodvi $(bindir)/gftodvi
  222.     $(proginstall) mfware/gftopk $(bindir)/gftopk
  223.     $(proginstall) mfware/gftype $(bindir)/gftype
  224.     $(proginstall) mfware/mft $(bindir)/mft
  225.     $(proginstall) fontutil/pktogf $(bindir)/pktogf
  226.     $(proginstall) fontutil/pktype $(bindir)/pktype
  227.     $(proginstall) fontutil/vftovp $(bindir)/vftovp
  228.     $(proginstall) fontutil/vptovf $(bindir)/vptovf
  229.     $(proginstall) bibtex/bibtex $(bindir)/bibtex
  230.     $(proginstall) dviutil/dvicopy $(bindir)/dvicopy
  231.     if test -d $(texpooldir); then exit 0; else mkdir $(texpooldir); fi
  232.     -if test -s tex/tex.pool; \
  233.         then (cd tex; $(fileinstall) tex.pool $(texpooldir) ); fi
  234.     if test -d $(mfpooldir); then exit 0; else mkdir $(mfpooldir); fi
  235.     -if test -s mf/mf.pool; \
  236.         then (cd mf; $(fileinstall) mf.pool $(mfpooldir) ); fi
  237.  
  238. install-formats: stamp-formats
  239.     if test -d $(formatdir); then exit 0; else mkdir $(formatdir); fi
  240.     for f in $(formats);                        \
  241.     do                                \
  242.       rm -f $(bindir)/`basename $$f .fmt`;                \
  243.           ln $(bindir)/virtex $(bindir)/`basename $$f .fmt`;        \
  244.           $(fileinstall) tex/$$f $(formatdir)/$$f;            \
  245.     done
  246.     cd $(formatdir); rm -f plain.fmt; ln tex.fmt plain.fmt
  247.  
  248. install-bases: stamp-bases
  249.     if test -d $(basedir); then exit 0; else mkdir $(basedir); fi
  250.     for f in $(bases);                        \
  251.     do                                \
  252.       rm -f $(bindir)/`basename $$f .base`;                \
  253.       ln $(bindir)/virmf $(bindir)/`basename $$f .base`;        \
  254.           $(fileinstall) mf/$$f $(basedir);                \
  255.     done
  256.     cd $(basedir); rm -f plain.base; ln mf.base plain.base
  257.  
  258.  
  259. # Need GNU tar for this.
  260. web2c-dist: web/tangleboot.pas
  261.     @echo -n "check -linet;tangleboot"
  262.     @echo "big{tex,mf.ch; trie change"
  263.     mv ChangeLog ChangeLog.W2C
  264.     cd ..;                                \
  265.       find src-$(version) \! -name '*.web' -type f -print > /tmp/files; \
  266.       tar czfT web2c-$(version).tar.Z /tmp/files;            \
  267.           ls -ld web*
  268.     mv ChangeLog.W2C ChangeLog
  269.  
  270. web-dist: web/tangleboot.pas
  271.     cd ..;                                \
  272.           find src-$(version) -name '*.web' -print > /tmp/webfest;    \
  273.           tar czfT web-$(version).tar.Z /tmp/webfest;            \
  274.           ls -ld web*
  275.  
  276. web/tangleboot.pas:
  277.     cd web; make tangle.p; cp tangle.p tangleboot.pas; make veryclean
  278.  
  279. clean:
  280.     rm -f stamp-*
  281.     for name in web2c common $(alldirs);                \
  282.         do                                \
  283.           (cd $${name}; make clean);                    \
  284.         done
  285.  
  286. veryclean:
  287.     rm -f stamp-*
  288.     for name in web2c common man $(alldirs);            \
  289.         do                                \
  290.           (cd $${name}; make veryclean);                \
  291.         done
  292.     rm -f \#*\# *~ *.bak *.ckp core
  293.  
  294. .PHONY: default triptrap run-triptrap clean-triptrap all TeX run-trip \
  295.     MF run-trap manpages bases formats install-manpages install \
  296.         install-formats install-bases web2c-dist web-dist clean veryclean
  297.  
  298.